package com.yihu.cms.service;

import java.io.IOException;

import com.yihu.beans.ResultVO;
import com.yihu.beans.user.Group;
import com.yihu.beans.user.GroupQuery;
import com.yihu.beans.user.ResourceURI;
import com.yihu.beans.user.ResourceURIQuery;
import com.yihu.beans.user.UserGroupRef;
import com.yihu.dataService.hessian.mongodb.interfaceService.ResourceURIHService;
import com.yihu.dataService.hessian.mongodb.interfaceService.UserGroupHService;
import com.yihu.dataService.hessian.resource.ResourceMongoDBManager;

public class ResourceURIService {

	ResourceURIHService resourceService = null;
	public ResourceURIService(){
		try {
			resourceService= (ResourceURIHService)ResourceMongoDBManager.getSingleton().getBeans("resourceURIServiceHSC");
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	public ResultVO addResource(ResourceURI resource){
		return resourceService.addResource(resource);
	}
	public ResultVO deleteResource(long id){
		return resourceService.deleteResource(id);
	}
	public ResultVO updateResource(ResourceURI resource){
		return resourceService.updateResource(resource);
	}
	public ResourceURI getResource(long id){
		return resourceService.getResource(id);
	}
	public String getResourceByPage(ResourceURIQuery query){
		return resourceService.getResourceByPage(query);
	}

}
